#include("./layout.html")
#include("./_include.html")
#include("_sidebar.html")
#@layout()

#define script()
#@sidebarIncludeJs()
#end

#define css()
<style>
.title-all-article{
    padding: 2rem 0.4rem 0.4rem 0.4rem;
    animation: fireDiv 1s infinite;
    font-size: 48px;
    font-weight: bold;
    user-select: none;
    color: #f80;
    background-image: url('#(T_PATH)/img/important/history_article.png');
    /*background-repeat: no-repeat;*/
    background-size: cover;
    /*-webkit-text-fill-color: transparent;*/
    /*-webkit-background-clip: text;*/
}
@keyframes fireDiv {
    0% {
      text-shadow: 0 0 4px white, 0 -10px 4px #ff3, 2px -15px 6px #fd3,
        -2px -20px 11px #f80, 2px -25px 18px #f20;
    }
    25% {
      text-shadow: 0 0 4px white, 2px -12px 6px #ff3, 2px -17px 8px #fd3,
        -3px -25px 11px #f80, 4px -35px 22px #f20;
    }
    50% {
      text-shadow: 0 0 4px white, 2px -15px 8px #ff3, 2px -19px 10px #fd3,
        -4px -30px 11px #f80, 4px -40px 25px #f20;
    }
    75% {
      text-shadow: 0 0 4px white, 2px -12px 6px #ff3, 2px -17px 8px #fd3,
        -3px -25px 11px #f80, 4px -35px 22px #f20;
    }
    100% {
      text-shadow: 0 0 4px white, 0 -10px 4px #ff3, 2px -15px 6px #fd3,
        -2px -20px 11px #f80, 2px -30px 18px #f20;
    }
}
</style>
#@sidebarIncludeCss()
#end

#define content()
<div class="col-md-8 col-lg-8 col-xl-9 #(option('whimurmur_sidebar_position') == 'left' ? 'offset-md-4 offset-lg-4 offset-xl-3 cl-right' : 'cl-left')">
    #set(page=C.request.getParameter('page'))
    #if(page == null)
        #set(page = 1)
    #end
    
    <div class="cl-card bg-light">
        <div class="cl-card-main">
            <h2 class="title-all-article">这里是网站的所有文章</h2>
        </div>
    </div>
    
    #articlePageEx(page=page, pageSize=50)
        #for(article : articlePageEx.list)
        <div class="cl-card bg-light">
            <a class="card-link" href="#(article.url)" target="#(option('whimurmur_link_to_blank') && article.linkTo ? '_blank' : '_self')">
                <div class="row">
    
                    <div class="col-lg-9 col-md-8 col-sm-12 cl-card-main bg-light">
                        <h3 class="cl-card-main-title">
                           #(article.title)
                        </h3>
                        <p class="cl-card-more">#(article.user.nickname ??) 发布于 #date(article.created ?? article.modified, "yyyy年MM月dd日 HH时")
                            &nbsp;|&nbsp;
                            #articleCategories(article.getId(), 'category')
                                分类：
                                #for(category: categories)
                                    #(category.title ??)
                                #end
                            #end
                            &nbsp;|&nbsp;
                            #articleCategories(article.getId(), 'tag')
                                标签：
                                #for(category: categories)
                                    #(category.title ??)
                                    #if(for.size != for.count)
                                        &nbsp;/&nbsp;
                                    #end
                                #end
                            #end
                        </p>
                    </div>
                </div>
            </a>
        </div>
        #end
        
        #articlePaginateEx(firstGotoIndex=false)
        <nav aria-label="">
            <ul class="pagination justify-content-center">
                #for(page : pages)
                <li class="page-item #(page.style)"><a class="page-link" href="#(page.url.replace('-', '?page='))">#(page.text)</a></li>
                #end
            </ul>
        </nav>
        #end
    #end

</div>

<div class="col-md-4 col-lg-4 col-xl-3 #(option('whimurmur_sidebar_position') == 'left' ? 'offset-mdn-8 offset-lgn-8 offset-xln-9 offset-smn-0 cl-left' : 'cl-right')">
    #@sidebarContent()
</div>
#end